Repository navigation
Compare bounded decoding against libheif in CI - #22
laurens-pilot wants to merge 1 commit into
Conversation
CI now decodes every corpus file with decode_bounded at max side 6000 and 97 and compares the result with the strict libheif oracle, after applying Exif orientation, sRGB conversion and an area average. Generated fixtures cover odd-size crops, rotations, mirrors and nclx colour. decode_bounded now refuses clap crops, rotations and mirrors for which libheif converts 4:2:0 chroma to 4:4:4 first, so every image it decodes matches libheif.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Superseded by ente#34. |
decode_boundedwas never compared with libheif in CI, so a bug that only the bounded path has could ship bad pixels unnoticed. A new step in theverifyjob decodes every file in the CI corpora withdecode_bounded, at max side 6000 and 97 with Ente's 512 MiB budget. It compares each result with the strict libheif oracle after applying Exif orientation, sRGB conversion and an area average, within ±1 per sample.The step also fails on:
Generated fixtures add odd-size crops, rotations, mirrors and Display P3/BT.2020 nclx images, and a few known-good files must pass.
The first run found a real divergence. libheif converts 4:2:0 chroma to 4:4:4 before a
clapcrop with an odd origin, and before rotating or mirroring an image with an odd width or height. heic-decoder keeps nearest-neighbour chroma there, anddecode_boundeddiffered from libheif by up to 191 on such files. It now refuses those transforms, judged step by step the way libheif decides. Across the CI corpora this refuses only synthetic test files. The regular decoder still differs on these cases; matching libheif there is a separate follow-up.Locally (macOS, libheif at the CI pin), the step takes about 30 s: 102 comparisons pass, 402 decodes are refused as unsupported, and nothing fails. It has not run on Linux yet.